package com.ryskoo.common.hclconstant;

/**
 * 烹饪状态
 *
 * @author BeHappy
 */
public enum CookStateEnum {
    COOKING(1, "烹饪中"),
    COOKED(2, "已上菜");
    private int value;
    private String name;

    CookStateEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (CookStateEnum o : CookStateEnum.values()) {
            if (o.getValue() == value) {
                return o.getName();
            }
        }
        return "";
    }
}
